package de.unibi.comet.ac;

import java.util.Iterator;

public interface SuffixStructureNode {
	/** Returns text from root to current note. */
	String getText();
	
	/** Returns text that (in a suffix tree) would be the label at 
	 *  the edge leading to this node. */
	String getEdgeText();
	
	/** Returns an iterator over the children of current node. */
	Iterator<SuffixStructureNode> childrenIterator();
	
	/** Returns an index of a starting position of a suffix which "uses"
	 *  current node. "Uses current node" means: current node lies between
	 *  root and leaf which corresponds to that suffix. Index is in general
	 *  ambigious and will be chosen abitrarily out of candidates. */
	int getOneIndex();
	
	/** Determines if the represented text (which would be returned
	 *  by getText()) is a suffix or just a common prefix of multiple
	 *  suffixes. */
	boolean isSuffix();
	
	/** Returns true if node is root of suffix tree. */ 
	boolean isRoot();
	
	/** Returns parent node. */
	SuffixStructureNode getParent();
	
	/** Returns child node which starts with specified character. If such
	 *  a node doesn't exist, null is returned. */
	SuffixStructureNode getChildByChar(char c);
	
	/** Returns a unique number. */
	int getNumber();
	
	/** Generates a textual representation in ps-tricks format. */
	String toPsTricks();
}
